package com.fujitsu.cn.fnst.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fujitsu.cn.fnst.base.BaseService;
import com.fujitsu.cn.fnst.dao.LogDao;
import com.fujitsu.cn.fnst.entiy.OperateLog;

@Service
@Transactional
public class LogService implements BaseService<OperateLog> {
    @Resource
    private LogDao logDao;
    @Override
    public OperateLog find(int id) {
        return logDao.query(OperateLog.class, id);
    }

    @Override
    public OperateLog modify(OperateLog t) {
        return logDao.update(t);
    }

    @Override
    public void delete(OperateLog t) {
        logDao.delete(t);
    }

    @Override
    public OperateLog add(OperateLog t) {
        return logDao.insert(t);
    }

    @Override
    public List<OperateLog> find(String queryString) {
        return logDao.query(queryString);
    }

    public List<OperateLog> getAllLogsByWhereAndOrder(String where, String order) {
        return logDao.getAllLogsByWhereAndOrder(where, order);
    }


}
